package cn.kgc.service;

import cn.kgc.dao.PersonMapper;
import cn.kgc.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Rock
 * @create 2020-08-01 10:43
 */
@Service
public class PersonServiceImpl implements PersonService {
    @Autowired(required = false)
    private PersonMapper mapper;

    @Override
    public List<Person> queryAll() {
        return mapper.queryAll();
    }

    @Override
    public Integer save(Person person) {
        return mapper.save(person);
    }

    @Override
    public Person queryById(Integer id) {
        return mapper.queryById(id);
    }

    @Override
    public Integer updatePerson(Person person) {
        return mapper.updatePerson(person);
    }

    @Override
    public Integer delete(Integer id) {
        return mapper.delete(id);
    }
}
